<?php
/*
Template Name: Portfolio Single Template
*/
//get_header();
require(WEBTREATS_INCLUDES . "/var.php");
?>


<div id="body_block" <?php webtreats_body_class(); ?>>
	
	<?php if($home_slider_page) { webtreats_header_slider_switcher($homepage_slider); } ?>
	
	<?php webtreats_teaser_text($post->ID); ?>
	
<div id="body_block_background">	
	<div class="inner">
						
	<?php $breadcrumb_post_disable = get_post_meta($post->ID, 'breadcrumb_post_disable', true);
			if (!$breadcrumb_disable && !$breadcrumb_post_disable){ if (class_exists('simple_breadcrumb')) { $bc = new simple_breadcrumb; }} ?>

	<div id="main">
		<div class="content">
				
<?php 
if(have_posts()) : while(have_posts()) : the_post();
	$date = get_post_meta($post->ID, 'portfolio_date',true); ?>	
			
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">	
	

		<h1 class="portfolio"><?php the_title(); ?><br />
			<span class="date"><?php echo $date; ?></span></h1>		
		
		
		<?php $portfolio_fullsize = get_post_meta($post->ID, 'portfolio_post_fullsize', true); ?>
		
		<?php if(!$portfolio_fullsize) { 
			
			$portfolio_full = get_post_meta($post->ID, 'portfolio_full_img',true);
			$portfolio_full = webtreats_image_resize($height=516,$width=882,$portfolio_full); ?>
			
		<div class="portfolio_full_item img_loader">
			<div class="load_img"><span class="rm_img noscript"><img class="framed" src="<?php echo $portfolio_full; ?>" alt="" /></span></div>
		</div>
		<?php } ?>
			
		<div class="entry">	
			<?php the_content(); ?>	
		</div>
	
<?php wp_link_pages('before=<div id="page-links">Pages: &after=</div>'); ?>

</div> <!-- .post -->

<?php if (!$social_bookmarks) { ?>
	<a href="#" class="share_this_post"></a>
<?php } ?>

<div class="clearboth"></div>


<div id="comments">
	<?php comments_template('', true); ?>
</div>

<?php endwhile; endif; ?>

	</div> <!-- content -->
</div> <!-- primary_full -->

<?php get_footer(); ?>